1. Field of the Invention
The present invention relates to a technique of testing a computer system, and more particularly to a method of testing and verifying power management features of a computer system in different modes including Standby, Hibernate, Shutdown, and Reboot.
2. The Related Art
The currently widely employed Windows operating systems, including Windows XP, Windows 2000, and Windows Me, all employ the Advanced Configuration and Power Interface (ACPI) included in the Basic Input and Output System (BIOS) of a computer system to provide power management features. The computer system with ACPI is able to control the power management of hardware in connection with the computer system.
ACPI is a power management system interface cooperatively developed and established by computer manufacturers for the purpose of providing a power management interface common to operating systems and hardware, so as to overcome the problem raised from various interfaces separately established by the computer manufacturers for computer power management. With ACPI, the operating system could well control power to the peripherals of the computer system in a defined manner.
The power management features defined by ACPI include Active, Hibernate, Standby, and Shutdown. The computer system may be put into the Standby or the Hibernate mold according to a user's setting. The Standby mode places the entire computer system in a low-power state, while the Hibernate mode puts the computer system into an even power-saving state. These power management features are particularly useful to portable computers that are battery-powered.
A typical portable computer includes a central processing unit (CPU), a system Basic Input Output System (SYS-BIOS), and a keyboard controller (KBC). The keyboard controller includes an embedded micro-controller, a keyboard Basic Input Output System (KB-BIOS), a memory, and other interfacing circuits with special functions. The portable computer is battery-powered. A battery state detecting interface in the keyboard controller is adapted to detect the power state of the battery in the portable computer. When the portable computer works under an operating system supporting ACPI, the operating system will periodically read battery state data in the keyboard controller using ACPI machine language (AML).
In a typical ACPI architecture of a computer system, it could place the computer into five different power states including:
S0—Active, with all power on;
S1—Standby, with display and drives powered off, but power maintained for central processing unit, memory and fans;
S2—Standby, with central processing unit and cache power off;
S3—Standby, with only minimal power maintained to Random Access Memory (RAM) for a fast startup;
S4—Hibernate with all power off and the image of the computer system saved to disk; and
S5—Complete power off with all files closed and no image saved to disk.
The computer goes into the Standby or the Hibernate mold depending on the user's setting. The Standby mode places the entire computer system in a low-power state, while the Hibernate mode puts the computer system into an even power-saving state. These power management features are particularly useful to portable computers that are battery-powered.
To ensure the computer system in use to execute various functions in a normal condition, the computer manufacture has to test and verify all features provided to the computer system as soon as the complicate hardware assembling is completed. For example, it is a very important issue in what manner different power states of the computer system should be tested to ensure that the computer operating system executes the above-mentioned ACPI power management feature normally. To test whether a computer system has normal power management functions or not, it is a common way to repeat the procedures of boot, standby, hibernation, shutdown, and reboot.
With the existing techniques, a tester has to stand in front of the computer system over a long time to repeat the tests of the above-mentioned functions of standby, hibernation, shutdown, and reboot, and to manually record how many times the tests have been completed. Therefore, the traditional way of testing power state is time-consuming and requires a considerably high labor cost.
To overcome the inconvenience existed in the traditional power state testing technique, there have been developed many new techniques in prior art for automatically testing the computer power state. However, these techniques necessitate association of software with specific hardware to enable the test. The software alone is not able to execute the test without the specific hardware. Therefore, these newly developed techniques are not only expensive, but also lack good flexibility and adaptation in their applications.